/*
 * Copyright 2015-2016 Imply Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

%bubble-cont {
  @extend %menu-cont;
  z-index: 31;

  .shpitz {
    $shpitz-size: 12px;
    $clip-size: 60px;
    position: absolute;
    width: $clip-size;
    height: $clip-size;
    overflow: hidden;
    pointer-events: none;

    &::after {
      content: '';
      position: absolute;
      width: $shpitz-size;
      height: $shpitz-size;
      transform: rotate(45deg);
      background: $white;
      box-shadow: 0 0 4px 0 rgba($black, 0.35);
    }

    &.top {
      top: $clip-size * -1;
      left: 50%;
      margin-left: $clip-size * -0.5;

      &::after {
        bottom: 0;
        left: 50%;
        margin-left: $shpitz-size * -0.5;
        margin-bottom: $shpitz-size * -0.5;
      }
    }

    &.bottom {
      bottom: $clip-size * -1;
      left: 50%;
      margin-left: $clip-size * -0.5;

      &::after {
        top: 0;
        left: 50%;
        margin-left: $shpitz-size * -0.5;
        margin-top: $shpitz-size * -0.5;
      }
    }

    &.left {
      left: $clip-size * -1;
      top: 50%;
      margin-top: $clip-size * -0.5;

      &::after {
        right: 0;
        top: 50%;
        margin-top: $shpitz-size * -0.5;
        margin-right: $shpitz-size * -0.5;
      }
    }

    &.right {
      right: $clip-size * -1;
      top: 50%;
      margin-top: $clip-size * -0.5;

      &::after {
        left: 0;
        top: 50%;
        margin-top: $shpitz-size * -0.5;
        margin-left: $shpitz-size * -0.5;
      }
    }
  }

}
